3.1.31 \(\int \frac {1+x}{(4+2 x+x^2) \sqrt {5+2 x+x^2}} \, dx\)

Optimal. Leaf size=15 \[ -\tanh ^{-1}\left (\sqrt {x^2+2 x+5}\right ) \]

________________________________________________________________________________________

Rubi [A]  time = 0.02, antiderivative size = 15, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 26, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.077, Rules used = {1024, 206} \begin {gather*} -\tanh ^{-1}\left (\sqrt {x^2+2 x+5}\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(1 + x)/((4 + 2*x + x^2)*Sqrt[5 + 2*x + x^2]),x]

[Out]

-ArcTanh[Sqrt[5 + 2*x + x^2]]

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 1024

Int[((g_) + (h_.)*(x_))/(((a_) + (b_.)*(x_) + (c_.)*(x_)^2)*Sqrt[(d_.) + (e_.)*(x_) + (f_.)*(x_)^2]), x_Symbol
] :> Dist[-2*g, Subst[Int[1/(b*d - a*e - b*x^2), x], x, Sqrt[d + e*x + f*x^2]], x] /; FreeQ[{a, b, c, d, e, f,
 g, h}, x] && NeQ[b^2 - 4*a*c, 0] && NeQ[e^2 - 4*d*f, 0] && EqQ[c*e - b*f, 0] && EqQ[h*e - 2*g*f, 0]

Rubi steps

\begin {align*} \int \frac {1+x}{\left (4+2 x+x^2\right ) \sqrt {5+2 x+x^2}} \, dx &=-\left (2 \operatorname {Subst}\left (\int \frac {1}{2-2 x^2} \, dx,x,\sqrt {5+2 x+x^2}\right )\right )\\ &=-\tanh ^{-1}\left (\sqrt {5+2 x+x^2}\right )\\ \end {align*}

________________________________________________________________________________________

Mathematica [C]  time = 0.04, size = 79, normalized size = 5.27 \begin {gather*} \frac {1}{2} \left (-\tanh ^{-1}\left (\frac {-i \sqrt {3} x-i \sqrt {3}+4}{\sqrt {x^2+2 x+5}}\right )-\tanh ^{-1}\left (\frac {i \sqrt {3} x+i \sqrt {3}+4}{\sqrt {x^2+2 x+5}}\right )\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(1 + x)/((4 + 2*x + x^2)*Sqrt[5 + 2*x + x^2]),x]

[Out]

(-ArcTanh[(4 - I*Sqrt[3] - I*Sqrt[3]*x)/Sqrt[5 + 2*x + x^2]] - ArcTanh[(4 + I*Sqrt[3] + I*Sqrt[3]*x)/Sqrt[5 +
2*x + x^2]])/2

________________________________________________________________________________________

IntegrateAlgebraic [A]  time = 0.30, size = 15, normalized size = 1.00 \begin {gather*} -\tanh ^{-1}\left (\sqrt {x^2+2 x+5}\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

IntegrateAlgebraic[(1 + x)/((4 + 2*x + x^2)*Sqrt[5 + 2*x + x^2]),x]

[Out]

-ArcTanh[Sqrt[5 + 2*x + x^2]]

________________________________________________________________________________________

fricas [B]  time = 0.41, size = 49, normalized size = 3.27 \begin {gather*} \frac {1}{2} \, \log \left (x^{2} - \sqrt {x^{2} + 2 \, x + 5} {\left (x + 2\right )} + 3 \, x + 6\right ) - \frac {1}{2} \, \log \left (x^{2} - \sqrt {x^{2} + 2 \, x + 5} x + x + 4\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((1+x)/(x^2+2*x+4)/(x^2+2*x+5)^(1/2),x, algorithm="fricas")

[Out]

1/2*log(x^2 - sqrt(x^2 + 2*x + 5)*(x + 2) + 3*x + 6) - 1/2*log(x^2 - sqrt(x^2 + 2*x + 5)*x + x + 4)

________________________________________________________________________________________

giac [B]  time = 0.35, size = 31, normalized size = 2.07 \begin {gather*} -\frac {1}{2} \, \log \left (\sqrt {x^{2} + 2 \, x + 5} + 1\right ) + \frac {1}{2} \, \log \left (\sqrt {x^{2} + 2 \, x + 5} - 1\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((1+x)/(x^2+2*x+4)/(x^2+2*x+5)^(1/2),x, algorithm="giac")

[Out]

-1/2*log(sqrt(x^2 + 2*x + 5) + 1) + 1/2*log(sqrt(x^2 + 2*x + 5) - 1)

________________________________________________________________________________________

maple [A]  time = 0.02, size = 14, normalized size = 0.93 \begin {gather*} -\arctanh \left (\sqrt {x^{2}+2 x +5}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((x+1)/(x^2+2*x+4)/(x^2+2*x+5)^(1/2),x)

[Out]

-arctanh((x^2+2*x+5)^(1/2))

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {x + 1}{\sqrt {x^{2} + 2 \, x + 5} {\left (x^{2} + 2 \, x + 4\right )}}\,{d x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((1+x)/(x^2+2*x+4)/(x^2+2*x+5)^(1/2),x, algorithm="maxima")

[Out]

integrate((x + 1)/(sqrt(x^2 + 2*x + 5)*(x^2 + 2*x + 4)), x)

________________________________________________________________________________________

mupad [B]  time = 3.76, size = 13, normalized size = 0.87 \begin {gather*} -\mathrm {atanh}\left (\sqrt {x^2+2\,x+5}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((x + 1)/((2*x + x^2 + 4)*(2*x + x^2 + 5)^(1/2)),x)

[Out]

-atanh((2*x + x^2 + 5)^(1/2))

________________________________________________________________________________________

sympy [B]  time = 7.00, size = 36, normalized size = 2.40 \begin {gather*} \frac {\log {\left (-1 + \frac {1}{\sqrt {x^{2} + 2 x + 5}} \right )}}{2} - \frac {\log {\left (1 + \frac {1}{\sqrt {x^{2} + 2 x + 5}} \right )}}{2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((1+x)/(x**2+2*x+4)/(x**2+2*x+5)**(1/2),x)

[Out]

log(-1 + 1/sqrt(x**2 + 2*x + 5))/2 - log(1 + 1/sqrt(x**2 + 2*x + 5))/2

________________________________________________________________________________________